package com.gitee.wsl.mathematics.vector.ext

import com.gitee.wsl.mathematics.vector.vec2.Vector2

fun<T:Number,V:Vector2<T, V>> lerp(a: Vector2<T, V>, b: Vector2<T, V>, t: Double) = a + ((b-a)*t)

fun<T:Number,V:Vector2<T, V>> lerp(a: Vector2<T, V>, b: Vector2<T, V>, t: Vector2<T, V>) = a.run {
    create(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y)
}